<div class="block_poster_commentaire">
    {% if is_granted("ROLE_USER") %}
        {{ form_start(form) }}
        {{ form_errors(form.commentaire) }}
        <div class="row">        
            <div class="col-xs-3 col-sm-2">
                <img class="img-rounded img-responsive pull-right" src="http://placehold.it/96&text={{ app.security.token.user.username }}" alt=""/>
            </div>
            <div class="col-xs-9 col-sm-10">
                {{ form_label(form.commentaire) }}
                {% block form_commentaire %}
                    {{ form_widget(form.commentaire) }}
                {% endblock %}                
            </div>
        </div>
        <div class="text-right block_post">
            {{ form_row(form.poster) }}
        </div>

        {{ form_rest(form) }}
    {% else %}
        <div class="alert alert-warning alert-link alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true" title="Fermer">&times;</button>
            <i class="fa fa-info-circle"></i> 
            
            <a class="connexion" title="Connectez-vous en 1 clic sur {{ site.currentSite.nom }} By Night" href="{{ path('fos_user_security_login') }}" >
                Connectez-vous
            </a> ou
            <a class="register" title="Inscrivez-vous en 1 clic sur {{ site.currentSite.nom }} By Night" href="{{ path('fos_user_registration_register') }}" >
                inscrivez-vous
            </a> 
            pour laisser un message
        </div>       
    {% endif %}
</div>